home *** CD-ROM | disk | FTP | other *** search
- /* arc.c */
- /* Entered by A. Wayner */
- # include <graphics.h>
- main()
- {
- int graphdriver = DETECT;
- int graphmode, xc, yc, radius, stangle, endangle;
- char buffer[80];
-
- /* Ask user for parameters of the arc */
- printf("Enter coordinates of center (x, y): ");
- scanf(" %d %d", &xc, &yc );
- printf("\nRadius, start angle and end angle : ");
- scanf(" %d %d %d", &radius, &stangle, &endangle);
-
- /* Detect adapter type and */
- /* initialize graphics system */
- initgraph( &graphdriver, &graphmode, "\\turboc");
-
- sprintf( buffer, "arc(%d, %d, %d, %d, %d)",
- xc, yc, stangle, endangle, radius );
- outtextxy( 10, 10, buffer);
-
- /* Now draw the arc */
- arc( xc, yc, stangle, endangle, radius );
-
- /* Wait until user presses a key */
- outtextxy( 10, getmaxy() - 50, "Press any key to exit");
-
- getch();
- closegraph();
-
- }
-